/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package helper.tx.tta;

import java.io.Serializable;

/**
 *
 * @author Lu Xiaodi
 */
public class Helper_SalesByCountry implements Serializable, Comparable {

    Double sales;
    String group;

    public Helper_SalesByCountry() {
    }

    public Helper_SalesByCountry(Double sales, String group) {
        this.sales = sales;
        this.group = group;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public Double getSales() {
        return sales;
    }

    public void setSales(Double sales) {
        this.sales = sales;
    }

    @Override
    public int compareTo(Object o) {
        if (!(o instanceof Helper_SalesByCountry)) {
            throw new UnsupportedOperationException("Not supported yet.");
        } else if (this.getSales() > ((Helper_SalesByCountry) o).getSales()) {
            return 1;
        } else if (this.getSales() < ((Helper_SalesByCountry) o).getSales()) {
            return -1;
        } else {
            return 0;
        }
    }
}
